
const path = require('path')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')

class MyPlugin {
    apply(compiler){
        console.log('');
        compiler.hooks.emit.tap()
    }

}

module.exports = {
    mode: 'none',
    entry : './src/main.js',
    output: {
        filename: 'bunder.js',
        path: path.join(__dirname, 'dist'),
        // publicPath: 'dist/'
    },
    module:{
        rules: [
            {
                test: /.md$/,
                use: [
                    'html-loader',
                    './markdown-loader',
                ]
            }
        ]
    },
    plugins:[
        new CleanWebpackPlugin(),
        new HtmlWebpackPlugin({
            title: 'Webpack plugin simple',
            meta:{
                viewport: 'width=device-width'
            },
            template: './src/index.html'
        }),
        new HtmlWebpackPlugin({
            filename: 'about.html'
        }),
    ]
        
    
    
}